﻿<!-- BEGIN MAIN CONTENT -->
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN: ACCORDION DEMO -->
        <div class="portlet light">
            <div class="portlet-title page-bar">
                <ul class="page-breadcrumb pull-right">
                    <li>
                        <i class="fa fa-home"></i>
                        <a href="#/home.html">管理中心</a>
                        <i class="fa fa-angle-right"></i>
                    </li>
                    <li>
                        <a href="#/GgcmsCategoryList.html?userType={{currentInfo.userType}}">分类导航管理</a>
                        <i class="fa fa-angle-right"></i>
                    </li>
                    <li>
                        <a href="javascript:;" data-ng-bind="$state.current.data.pageTitle"></a>
                    </li>
                </ul>
                <div class="caption font-green-sharp">
                    <i class="icon-note font-green-sharp"></i>
                    <span class="caption-subject bold uppercase" data-ng-bind="$state.current.data.pageTitle"></span>
                </div>
            </div>
            <div class="portlet-body">
                <div class="row">
                    <div class="col-xs-12">
                        <form class="form-horizontal" name="ggcmsForm" role="form" novalidate>
                            <input type="hidden" ng-model="data.Id">
                            <div class="form-body">
                                <div class="form-group" ng-class="{'has-error' : ggcmsForm.Categoryname.$invalid&&!ggcmsForm.Categoryname.$pristine}">
                                    <label class="col-md-3 control-label">分类名称:</label>
                                    <div class="col-md-9">
                                        <input type="text" name="Categoryname" minlength="2" maxlength="30" class="form-control" placeholder="分类名称" required ng-model="data.CategoryName">
                                        <div class="help-block" ng-show="ggcmsForm.Categoryname.$invalid&&!ggcmsForm.Categoryname.$pristine"> 分类名称 </div>
                                    </div>
                                </div>
                                <div class="form-group" ng-if="data.Id==0">
                                    <label class="col-md-3 control-label">上级分类:</label>
                                    <div class="col-md-6">
                                        <div class="input-group">
                                            <span class="form-control" ng-bind="data.parentName"></span>
                                            <div class="input-group-btn">
                                                <button type="button" class="btn btn-default dropdown-toggle" ng-click="currentInfo.showCategoryTree=!currentInfo.showCategoryTree">
                                                    <i class="fa fa-angle-down"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <treecontrol ng-if="currentInfo.showCategoryTree" class="tree-classic" expanded-nodes="currentInfo.expandedNodes" tree-model="currentInfo.dataForTheTree" options="treeOptions" on-selection="showSelected(node)" selected-node="currentInfo.selectNode">
                                            [{{node.Id}}] {{node.CategoryName}}
                                        </treecontrol>
                                    </div>
                                </div>
                                <div class="form-group" ng-class="{'has-error' : ggcmsForm.btnSelectLogo.$invalid&&!ggcmsForm.btnSelectLogo.$pristine}">
                                    <label class="col-md-3 control-label">Logo:</label>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control input-medium inline-block" ng-model="data.LogoImg" name="Logo" id="Logo" placeholder="可以直接填写Url地址" />
                                        <button class="btn blue" type="button" ngf-select="editSvr.fileUpload($file,'LogoImg',false,0)" ng-model="currentInfo.btnSelectLogo" name="btnSelectLogo" ngf-pattern="'image/*'" ngf-accept="'image/*'" ngf-max-size="500KB"> <i class="icon-picture"></i> 选择图片 </button>
                                        <button class="btn green" type="button" name="btnPreviewLogo" ng-if="data.LogoImg" ng-click="editSvr.filePreview('LogoImg')"> <i class="icon-eye"></i> 预览 </button>
                                        <button class="btn red" type="button" name="btnClearLogo" ng-if="data.LogoImg" ng-click="editSvr.fileClear('LogoImg')"> <i class="icon-trash"></i> 清除 </button>
                                        <div class="help-block" ng-show="ggcmsForm.btnSelectLogo.$invalid&&!ggcmsForm.btnSelectLogo.$pristine"> 只能上传小于500kb的图片 </div>
                                    </div>
                                </div>
                                <div class="form-group" ng-class="{'has-error' : ggcmsForm.Curl.$invalid&&!ggcmsForm.Curl.$pristine}">
                                    <label class="col-md-3 control-label">跳转url:</label>
                                    <div class="col-md-9">
                                        <input type="text" name="Curl" minlength="2" maxlength="30" class="form-control" placeholder="跳转url" ng-model="data.Curl">
                                        <div class="help-block" ng-show="ggcmsForm.Curl.$invalid&&!ggcmsForm.Curl.$pristine"> url地址不正确 </div>
                                    </div>
                                </div>
                                <div class="form-group" ng-class="{'has-error' : ggcmsForm.Description.$invalid&&!ggcmsForm.Description.$pristine}">
                                    <label class="col-md-3 control-label">摘要信息:</label>
                                    <div class="col-md-9">
                                        <input type="text" name="Description" minlength="2" maxlength="30" class="form-control" placeholder="摘要信息" ng-model="data.Description">
                                        <div class="help-block" ng-show="ggcmsForm.Description.$invalid&&!ggcmsForm.Description.$pristine"> 摘要信息 </div>
                                    </div>
                                </div>
                                <div class="form-group" ng-class="{'has-error' : ggcmsForm.Content.$invalid&&!ggcmsForm.Content.$pristine}">
                                    <label class="col-md-3 control-label">分类说明:</label>
                                    <div class="col-md-9">
                                        <summernote config="editoptions" id="Content" name="Content" class="form-control" placeholder="分类说明" ng-model="data.Content" on-image-upload="editSvr.imagesUpload(files,'Content')"></summernote>
                                        <div class="help-block" ng-show="ggcmsForm.Content.$invalid&&!ggcmsForm.Content.$pristine"> 分类说明 </div>
                                    </div>
                                </div>
                                <div class="form-group" ng-class="{'has-error' : ggcmsForm.Extattrib.$invalid&&!ggcmsForm.Extattrib.$pristine}">
                                    <label class="col-md-3 control-label">扩展属性:</label>
                                    <div class="col-md-9">
                                        <input type="text" name="Extattrib" minlength="2" maxlength="30" class="form-control" placeholder="扩展属性" ng-model="data.Extattrib">
                                        <div class="help-block" ng-show="ggcmsForm.Extattrib.$invalid&&!ggcmsForm.Extattrib.$pristine"> 扩展属性 </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-actions">
                                <hr/>
                                <div class="row">
                                    <div class="col-md-12 text-center">
                                        <button class="btn green" ng-click="editSvr.update(data)" ng-disabled="ggcmsForm.$invalid||saveing"> <span class="fa fa-save"></span> 保存</button>
                                    </div>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
        <!-- END: ACCORDION DEMO -->
    </div>
</div>
<!-- END MAIN CONTENT -->
<pic-pre-view url="currentInfo.pic" close="editSvr.previewClose()" ng-if="currentInfo.picShow"></pic-pre-view>